package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.Domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_order_pay")
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Order对象", description = "商品")
public class OrderPay extends Domain {
    //id策略采用自增长方式
    @JsonFormat(
            shape = JsonFormat.Shape.STRING
    )
    @TableId(value = "id", type = IdType.AUTO)//如果没有这句 id会以很大的id
    @ApiModelProperty(name = "id", value = "主键-ID")
    private Long id;

    @ApiModelProperty(value = "订单号")
    private String orderNo;
    @ApiModelProperty(value = "订单金额")
    private String amount;
    @ApiModelProperty(value = "服务费")
    private BigDecimal serviceFee;
    @ApiModelProperty(value = "实际金额")
    private BigDecimal actualAmount;
    @ApiModelProperty(value = "付款凭证")
    private String pic ;

    /**
     * fail("fail", "失败"),
     * handling("handling", "代付中"),
     * success("success", "成功");
     */
    @ApiModelProperty(value = "订单状态 待支付 notPay 已支付:paid 支付中 :pay_ing")
    private String status;
    @ApiModelProperty(value = "商户id")
    private Long merchantId;

    @ApiModelProperty(value = "接单用户id")
    private Long userId;
    @ApiModelProperty(value = "商户用户名")
    private String username;
    @ApiModelProperty(value = "接单人用户名")
    private String receiveUsername;
    @ApiModelProperty(value = "银行名称/支付宝")
    private String bankName;
    @ApiModelProperty(value = "收款人姓名")
    private String name;
    @ApiModelProperty(value = "收款人账号")
    private String accountNumber;
    @ApiModelProperty(value = "  账号类型 bank zfb wx")
    private String accountType;
    @ApiModelProperty(value = "回调下游时间")
    private String notifyTime;
    @ApiModelProperty(value = "下游订单号")
    private String merchantOrderNo;
    @ApiModelProperty(value = "下游回调地址")
    private String notifyUrl;
    @ApiModelProperty(value = "下游是否返回 1 已返回 0  未返回 ")
    private Integer returnStatus;

    @ApiModelProperty(value = "接单状态1,0  ")
    private Integer receiveStatus;


}